import { PlusOutlined } from '@ant-design/icons';
import {
    ModalForm,
    ProForm,
    ProFormDateRangePicker,
    ProFormSelect,
    ProFormText,
} from '@ant-design/pro-components';
import { Button, Form, message } from 'antd';
import MessageTables from "@/pages/reports/MessageTables";

export default (props) => {
    const {chatterCode} = props;
    const [form] = Form.useForm<{ name: string; company: string }>();
    return (
        <ModalForm<{
            name: string;
            company: string;
        }>
            title="Chat Detail"
            trigger={
                <a type="primary">
                    Chat
                </a>
            }
            form={form}
            autoFocusFirstInput
            modalProps={{
                destroyOnClose: true,
                onCancel: () => console.log('run'),
            }}
            submitTimeout={2000}
            onFinish={async (values) => {
                console.log(values.name);
                message.success('提交成功');
                return true;
            }}
        >
            <MessageTables chatterAccount={chatterCode}/>
        </ModalForm>
    );
};